﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using Qianli.DirSir.DAL;
using Qianli.DirSir.Model;

namespace Qianli.DirSir.BLL
{
    public class CustomersInfoBLL
    {
        CustomersInfoDAL dal = new CustomersInfoDAL();
        /// <summary>
        /// 显示客户信息
        /// </summary>
        /// <returns></returns>
        public List<CustomersInfo> ShowCustomersInfo()
        {
            return dal.ShowCustomersInfo();
        }
        /// <summary>
        /// 显示城市信息
        /// </summary>
        /// <returns></returns>
        public List<CityInfo> ShowCity()
        {
            return dal.ShowCity();
        }
        /// <summary>
        /// 添加客户信息
        /// </summary>
        /// <param name="cust"></param>
        /// <returns></returns>
        public int AddCustomersInfo(CustomersInfo cust)
        {

            return dal.AddCustomersInfo(cust);
        }
        /// <summary>
        /// 删除客户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DelCustomersInfo(int id)
        {
            return dal.DelCustomersInfo(id);
        }
        /// <summary>
        /// 根据id获取客户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public CustomersInfo GetCustomersInfoByid(int id)
        {
            return dal.GetCustomersInfoByid(id);
        }
        /// <summary>
        /// 修改客户信息
        /// </summary>
        /// <param name="cust"></param>
        /// <returns></returns>
        public int UptCustomersInfo(CustomersInfo cust)
        {
            return dal.UptCustomersInfo(cust);
        }


        /// <summary>
        /// 根据姓名搜索客户信息
        /// </summary>
        /// <param name="CustomersName"></param>
        /// <returns></returns>
        public List<CustomersInfo> GetCustomersInfoByCustomersName(string CustomersName)
        {
            return dal.GetCustomersInfoByCustomersName(CustomersName);

        }
    }
}
